package com.cfec.ipoth_service.Controller;

import com.cfec.ipoth_service.util.FileUtils;
import com.cfec.ipoth_service.util.ResultData;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.UUID;

@RestController
@RequestMapping("/file")
@ApiOperation(value = "控制层:视频")
public class FileController {

    @PostMapping("/uploadVideo")
    @ApiOperation("上传视频")
    public ResultData<String> uploadVideo(@RequestParam("file") MultipartFile file) {
        FileUtils fileUtils = new FileUtils();
        return fileUtils.uploadVideo(file);
    }
}